package com.vogue.supplymall.order.domain.service.impl;

import com.vogue.ssm.database.dao.BaseDao;
import com.vogue.supplymall.order.domain.dao.OrderPayVoucherDao;
import com.vogue.supplymall.order.domain.model.OrderPayVoucher;
import com.vogue.supplymall.order.domain.service.OrderPayVoucherService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * The type Order pay voucher service.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-04-09
 */
@Service("orderPayVoucherService")
public class OrderPayVoucherServiceImpl extends BaseServiceImpl<OrderPayVoucher, Long> implements OrderPayVoucherService {

    /**
     * The constant log.
     */
    public static final Logger LOGGER_ORDERPAYVOUCHERSERVICEIMPL = LoggerFactory.getLogger(OrderPayVoucherServiceImpl.class);

    @Resource
    private OrderPayVoucherDao orderPayVoucherDao;

    /**
     * Instantiates a new Base service.
     *
     * @param baseDao the base dao
     */
    public OrderPayVoucherServiceImpl(BaseDao<OrderPayVoucher, Long> baseDao) {
        super(baseDao);
    }

    @Override
    public List<OrderPayVoucher> getForOrderId(Long orderId, Long paymentId) {
        return orderPayVoucherDao.getForOrderId(orderId, paymentId);
    }
}
